package hn.sigit.util;

import java.io.Serializable;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

@Name("appOptions")
@Scope(ScopeType.SESSION)
@AutoCreate
public class AppOptions implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private String uploadFileSavePath;

	public String getUploadFileSavePath() {
		if (uploadFileSavePath != null) {
			if (!uploadFileSavePath.startsWith("/"))
				uploadFileSavePath = "/" + uploadFileSavePath;
		}
		return System.getProperty("user.home") + uploadFileSavePath;
	}
	public void setUploadFileSavePath(String uploadFileSavePath) {
		this.uploadFileSavePath = uploadFileSavePath;
	}
}
